package com.lwm.annotationandreflection.ref;

import com.lwm.annotationandreflection.anno.MyAnnotation;

import java.lang.annotation.ElementType;

/**
 * @author liweimin
 * @date 2020/9/24 16:06
 * @description 哪些类型有Class
 */
public class ref03 {
    public static void main(String[] args) {
        //对象
        Class<Object> objectClass = Object.class;
        //接口
        Class<Comparable> comparableClass = Comparable.class;
        //一维数组
        Class<int[]> aClass = int[].class;
        //注解
        Class<MyAnnotation> myAnnotationClass = MyAnnotation.class;
        //枚举
        Class<ElementType> elementTypeClass = ElementType.class;
        //viod
        Class<Void> voidClass = void.class;
        //二维数组
        Class<Integer[][]> aClass1 = Integer[][].class;
        //长度不同的数组
        Integer[] integers = new Integer[19];
        Class<? extends Integer[]> aClass2 = integers.getClass();
        Integer[] integerss = new Integer[119];
        Class<? extends Integer[]> aClass3 = integerss.getClass();
    }
}
